﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShareNews.aspx.cs" Inherits="MediaMonitor.ShareNews" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <link rel="stylesheet" href="css/style.css" />
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/script.js"></script>
    <script type="text/javascript" src="js/script2.js"></script>
    <script type="text/javascript" src="js/script3.js"></script>
        <script type="text/javascript" src="js/general.js"></script>
</head>
<body>


    <form id="form1" runat="server">
    <div id="content" class="wrapper-content">

<div class="container">
<div style="margin-top:10px;">
     <a href="default.aspx"> <img src="images/logo.png" /></a>
        </div>
<div class="news-content ">
      <div id="Div3" runat="server" visible="true"
                                            class="span3 press-inn internet-inn">
                                            <h2>
                                            <asp:Label ID="lblMediaTypeName" runat="server"></asp:Label>
                                              <asp:HiddenField id="hdnID" ClientIDMode="Static" runat="server" />
                                                - <small>
                                                <asp:Label ID="lblRFDate" runat="server"></asp:Label>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                 <asp:Label ID="lblTitle" runat="server"></asp:Label>
                                                  </h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                         <asp:Label ID="lblRFDate2" runat="server"></asp:Label>
                                                       </p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                         <asp:Label ID="lblMediaName" runat="server"></asp:Label>
                                                           
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                          <asp:Label ID="lblSectionDescription" runat="server"></asp:Label>
                                                           </span></p>
                                                </div>
                                                <div class="press-detail">
                                                    <p> <asp:Label ID="lblNews" runat="server"></asp:Label>
                                                        </p>
                                                </div>
                                                
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                        <asp:Label ID="lblCalification" runat="server"></asp:Label>
                                                           </span></p>
                                                    <p>
                                                        Importancia:<span>
                                                         <asp:Label ID="lblImportant" runat="server"></asp:Label>
                                                           </span></p>
                                                </div>

                                                <div>
                                                <a href="#" id="aView">Ver Fuente</a>
                                                </div>
                                               
                                        </div>
</div>
    </div></div></div>
    </form>
    
</body>

<script type="text/javascript">

    $('#aView').click(function () {
        var ID = $("#hdnID").val();
        var jsdata = '{ID:' + ID + '}';
        var newID;
        var imagename;
        var mediaTypeName;
        var sectionCode;
        $.ajax({

            type: "POST",

            url: "ShareNews.aspx/getNewsAlert1",

            data: jsdata,

            contentType: "application/json",
            dataType: "json",
            success: function (data) {
                for (var i = 0; i < data.d.length; i++) {
                    newID = data.d[i].ID;
                    imagename = data.d[i].ImageAudioVideoName;
                    mediaTypeName = data.d[i].MediaTypeName;
                    sectionCode = data.d[i].SectionCode;

                }
                popup(newID, imagename, mediaTypeName, sectionCode);
            }

        });

       
    });
    
    function popup(ID, Name, MediaType, SectionCode) {
        switch (MediaType) {
            case "Internet":
                PopupCenterWithScroll('sitefiles/Internet.aspx?ID=' + ID + '&t=s&file=' + Name, '_blank', 750, 700);
                break;
            case "TV":
                PopupCenter('sitefiles/NewsAlertvideo.aspx?SectionCode=' + SectionCode + '&t=f&ID=' + ID, '_blank', 350, 280);
                break;
            case "Radio":
                PopupCenter('sitefiles/NewsAlertradio.aspx?SectionCode=' + SectionCode + '&t=f&ID=' + ID, '_blank', 350, 280);
                break;
            case "Press":
                PopupCenterWithScroll('sitefiles/NewsAlertpress.aspx?ID=' + ID + '&t=s&file=' + Name, '_blank', 750, 700);
                break;
        }

    }
</script>

</html>
